<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.7.9/vue.js"></script>
</head>

<body>
    <div id="app">
        <div>
            <p v-if="isShow">星期一</p>
            <p v-show="isShow">星期一</p>
        </div>
        <div v-if="isShow">
            <img style="width:300px"
                src="https://img.sj33.cn/uploads/202005/192P05a4-9.jpg" />
            <img style="width:300px" :src=imgUrl />
        </div>
        <img :src=imgUrl alt=""
        style="width:300px">;;
        <button @click="changeState">点击</button>
    </div>
    <script>
        new Vue({
            el: '#app',
            data: {
                isShow: true,
                imgUrl:''
            },
            methods: {
                changeState() {
                    this.isShow ? this.isShow = false : this.isShow = true;
                    this.imgUrl = "https://www.2008php.com/2012_Website_appreciate/2012-04-29/20120429101758.jpg"
                }
            }
        })
    </script>
</body>

</html>